package org.openstock.impl.def.charting.ui.swing.widget;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import org.openstock.design.Registerable;
import org.openstock.impl.def.charting.ui.swing.listener.NewChartActionListener;
import org.openstock.impl.def.core.factory.Factory;
import org.openstock.impl.def.core.ui.swing.widget.NewMenu;
import org.openstock.impl.def.core.ui.swing.wrapper.JMenuItem;

public class ChartMenuItem extends JMenuItem implements Registerable{
	private static final long serialVersionUID = 3862436559223083492L;

	@Override
	public void register() {
		Factory.getSingleton(NewMenu.class).add(this);
	}
	
	public ChartMenuItem() {
		super("Chart",KeyEvent.VK_C,ActionEvent.ALT_MASK,"chart.png");
		addActionListener(Factory.getSingleton(NewChartActionListener.class));
	}
	
}
